package com.demo.nacos.controller;

import com.demo.nacos.feign.ProviderServiceFeign;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务消费者
 *
 * @author 夜曲sin
 * @create 2021/6/24
 */
@RestController
@RequestMapping("/customer")
public class CustomerController {

    private static final Logger log = LoggerFactory.getLogger(CustomerController.class);

    @Autowired
    private ProviderServiceFeign providerServiceFeign;

    @GetMapping("/service1")
    public String service1() {
        log.info("CustomerController.service1() ...");
        return providerServiceFeign.service1();
    }
}
